const {Sequelize,Model} = require('sequelize');
const sequelize = require('../db/index');
class Question extends Model{}

Question.init({
  question_id:{
    type:Sequelize.INTEGER(11),
    autoIncrement:true,
    primaryKey:true
  },
  type_id:{
    type:Sequelize.INTEGER(11),
    field:'type_id'
  },
  kp_id:{
    type:Sequelize.INTEGER(11),
    field:'kp_id'
  },
  question:{
    type:Sequelize.TEXT,
    allowNull:false
  },
  answer:{
    type:Sequelize.TEXT,
    defaultValue:'暂无答案'
  },
},{
  sequelize,
  tableName:'question'
})
module.exports = Question;